from Action.SpriteWelcome import WelcomeSprite
from Scene.BaseScene import BaseScene, ScenePassStatus


class Fail_Scene(BaseScene):
    """
    失败场景
    """
    def __init__(self, fail_sprite):
        super(Fail_Scene, self).__init__(fail_sprite,
                                         "../Resources/images/fail/fail.jpg")
        self.actor = WelcomeSprite(50, 300, "../Resources/images/fail/f_%d.png", 9)

    def draw_actor(self):
        self.actor.draw(self.current_surface)

    def run(self, down_flag, key_list):
        self.actor.run(down_flag, key_list)
        if self.actor.pos_x > 1000:
            self.pass_status = ScenePassStatus.over

    def get_pass_status(self):
        if self.pass_status != ScenePassStatus.over:
            return self.pass_status, None
